package main

import "fmt"

func main() {
	defer func() {
		if err := recover(); err != nil {
			fmt.Println(err)
		}
	}()
	container := map[int]string{0: "a", 1: "b", 2: "c"}
	fmt.Printf("%v\n", container[1])
	fmt.Println("---")
	val, ok := interface{}(container).(map[int]string)
	// 类型断言
	if ok {
		fmt.Printf("%v\n", val[0])
	}
	var varC interface{}
	varC = container[1]
	varCval := interface{}(varC).(int)
	fmt.Printf("%v\n", varCval)
	if varCval == 0 {
		panic("val is empty")
	}
}
